package com.ruoyi.question.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 题库对象 dt_question
 *
 * @author llc
 * @date 2025-01-06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DtQuestion extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 题目ID
     */
    private Long id;
    /**
     * 题目内容
     */
    @Excel(name = "题目内容")
    private String title;
    /**
     * 分类ID
     */
    @Excel(name = "分类ID")
    private Long categoryId;
    /**
     * 类型ID
     */
    @Excel(name = "类型ID")
    private Long typeId;
    /**
     * 出题人
     */
    @Excel(name = "出题人")
    private String creator;
    /**
     * 逻辑删除(0-未删除,1-已删除)
     */
    @Excel(name = "逻辑删除(0-未删除,1-已删除)")
    private Integer isDeleted;


    /**
     * 问题类型对象，用于存储问题的类型信息
     */
    @Excel(name = "问题类型")
    private DtQuestionType dtQuestionType;

    /**
     * 分类对象，用于存储问题的分类信息
     */
    @Excel(name = "分类")
    private DtCategory dtCategory;

    /**
     * 问题解析对象，用于存储对问题的分析和解析信息
     */
    @Excel(name = "答案解析")
    private DtQuestionAnalysis dtQuestionAnalysis;

    /**
     * 答案对象，用于存储问题的答案信息
     */
    @Excel(name = "选项详情")
    private List<DtAnswer> dtAnswers;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("title", getTitle())
                .append("categoryId", getCategoryId())
                .append("typeId", getTypeId())
                .append("creator", getCreator())
                .append("isDeleted", getIsDeleted())
                .toString();
    }
}
